﻿#include "datahandle.h"

DataHandle::DataHandle(QCustomPlot *plot)
{

    m_plot = plot;
    m_chart = new ChartOperate(plot);

}

void DataHandle::InitDataAndUI()
{
    m_chart->makeInitChart();
}

void DataHandle::openANewFile(QString fileName)
{
    m_chart->openANewFile(fileName);
}

void DataHandle::saveAnOtherFile(QString fileName)
{
    m_chart->saveAnOtherFile(fileName);
}

void DataHandle::isShowLegend(bool isShow)
{
    m_chart->isShowLegend(isShow);
}

void DataHandle::setLabelPos(QLabel *lblPos)
{
    m_chart->setLabelPos(lblPos);
}

void DataHandle::setCBoxFiles(QComboBox *cboxFiles)
{
    m_chart->setCBoxFiles(cboxFiles);
}

void DataHandle::setSaveTextEdit(QLineEdit *saveEdit)
{
     m_chart->setSaveTextEdit(saveEdit);
}

void DataHandle::setSaveButton(QPushButton *saveBtn)
{
     m_chart->setSaveButton(saveBtn);
}






